# coding=utf-8
from selenium import webdriver

driver = webdriver.Firefox()
driver.get("http://www.python.org")       
assert "Python" in driver.title
driver.find_element_by_id("q").send_keys("selenium")
driver.find_element_by_class_name("input-button").click()
driver.find_element_by_xpath("//ol[@id='rso']/li/div/h3/a").click()

driver.close()

